﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Base.Core.Biz
{
    public class PagingInfo
    {
        public PagingInfo() { }

        public PagingInfo(int pageIndex, int recordsPerPage)
        {
            this.RecordsPerPage = recordsPerPage;            
            this.PageIndex = pageIndex;
        }

        //public PagingInfo(int recordTotal, int pageIndex, int recordsPerPage)
        //{
        //    this.RecordsPerPage = recordsPerPage;
        //    this.RecordTotal = recordTotal;
        //    this.PageIndex = pageIndex;
        //}

        //public int RecordTotal { get; set; }

        public int PageIndex { get; set; }

        public int RecordsPerPage { get; set; }

        public static PagingInfo Default
        {
            get
            {
                //return new PagingInfo(0, 1, 10);
                return new PagingInfo()
                {
                    PageIndex = 1,
                    RecordsPerPage = 10
                };
            }
        }

        public const int AllRecordPerPage = -1;
    }
}
